<?php

namespace C\M;

use C\L\Model;

class Message extends Model
{
    public function initialize()
    {
        $this->setSource('messages');
    }

    public function beforeValidationOnCreate()
    {
        $this->created_at = $this->updated_at = date('Y-m-d H:i:s');

        return true;
    }

    public function beforeValidationOnUpdate()
    {
        $this->updated_at = date('Y-m-d H:i:s');
        return true;
    }
}
